const db = require('../db/index')

//获取所有视频
exports.getAllVideo=(req,res)=>{
    let body=req.body
    const sql=`insert into chat (pub_id,pub_avatar,pub_name,receive_id,receive_avatar,receive_name,content,time) values (?,?,?,?,?,?,?,?)`
    db.query(sql, [body.pub_id,body.pub_avatar,body.pub_name,body.receive_id,body.receive_avatar,body.receive_name,body.content,body.time], (err, results) => {
        if (err) return res.cc(err)

        // console.log(results)
        return res.send({
            status: 0,
            message: '插入成功！'
        })
    })
}